package com.cmas.manage.mapper;

import com.cmas.manage.domain.CApply;
import com.cmas.manage.domain.Community;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cmas.manage.vo.CountDataVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 社团Mapper接口
 *
 * @author cmas
 * @date 2021-05-03
 */
public interface CommunityMapper extends BaseMapper<Community> {

    List<Community> listVo(Community community);


    List<CApply> selectWaitApprovalByUser(Long userId);

    List<CApply> selectAgreeByUser(Long userId);

    List<CApply> selectRefuseByUser(Long userId);

    @Select("select count(*) from community")
    Integer communityCount();

    List<CountDataVo> ccCount();

    /**
     * 进入社团学生的部门ID
     * @return
     */
    List<Long> selectDeptId();
}
